Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement volume resizing #116

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Implement volume resizing #116

wants to merge 3 commits into from

Conversation

AaronDewes
Copy link

@AaronDewes AaronDewes commented Feb 24, 2024

Which issue(s) this PR fixes:

longhorn/longhorn#8022

What this PR does / why we need it:

Currently, SPDK volumes can not be resized. This aims at fixing this, and allows both growing and shrinking volumes.

Special notes for your reviewer:

I've not contributed to Longhorn before and this is completely untested. I'm trying to implement & test this feature, this is just a draft.

Additional documentation or context

@AaronDewes AaronDewes marked this pull request as draft February 24, 2024 23:10
AaronDewes added a commit to nirvati/longhorn-instance-manager that referenced this pull request Feb 24, 2024
Once longhorn/longhorn-spdk-engine#116 is merged, this needs to be reverted
AaronDewes added a commit to nirvati/longhorn-instance-manager that referenced this pull request Feb 25, 2024
Once longhorn/longhorn-spdk-engine#116 is merged, this needs to be reverted

Signed-off-by: Aaron Dewes <[email protected]>
This works by resizing all replicas individually.

Signed-off-by: Aaron Dewes <[email protected]>
Copy link

mergify bot commented Feb 26, 2024

This pull request is now in conflict. Could you fix it @AaronDewes? 🙏

@AaronDewes
Copy link
Author

The approach this takes is that individual replicas are all resized. A RAID device in spdk should be automatically resized if all underlying devices grow (https://github.com/longhorn/spdk/blob/6925ca6543e4ad5a5e3a5db09217ae16bf939831/module/bdev/raid/bdev_raid.c#L2102).

@derekbit
Copy link
Member

derekbit commented Mar 1, 2024

There is a dm linear device on the top of a device created by SPDK, so need to handle the dm device when expanding a volume.

Copy link

mergify bot commented Apr 17, 2024

This pull request is now in conflict. Could you fix it @AaronDewes? 🙏

1 similar comment
Copy link

mergify bot commented Apr 24, 2024

This pull request is now in conflict. Could you fix it @AaronDewes? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants